package cn.springcloud.book.controller;

import cn.springcloud.book.service.HelloFeignservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by mfwudongliang on 2018/10/10.
 */
@RestController
public class HelloFeignController {
    @Autowired
    private HelloFeignservice helloFeignService;

    //服务消费者对位提供的服务
    @GetMapping(value = "/search/github")
    public String searchGithubRepoByStr(@RequestParam("str") String queryStr) {
        return helloFeignService.searchRepo(queryStr);
    }
}
